options mprint; data orders; length Model $11; input CustomerID $ OrderDate:date7. Model $ Quantity; cards; 287 15OCT03 DeltaBreeze 15 287 15OCT03 SantaAna 15 274 16OCT03 JetStream 1 174 17OCT03 SantaAna 20 174 17OCT03 Nor'easter 5 174 17OCT03 Scirocco 1 347 18OCT03 Mistral 1 287 21OCT03 DeltaBreeze 30 287 21OCT03 SantaAna 25 ; run; proc print data=orders; run; %macro reports; %if &sysday = Monday %then %do; proc print data=orders noobs; format OrderDate date7.; title "&sysday Report: Current Orders"; %end; %else %if &sysday = Friday %then %do; proc tabulate data=orders; class CustomerID; var Quantity; table CustomerID ALL, Quantity; title "&sysday Report: Summary of Orders"; %end; %mend reports; %reports